package com.zx.dao.shop;

import com.zx.dto.request.goods.GoodsRequestDto;
import com.zx.dto.request.shop.CartRequestDto;
import com.zx.dto.response.shop.ShoppingCartDto;
import com.zx.model.shop.ShoppingCart;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author sunkai
 * @date 2022/8/3 0003 12:32
 * @mood zhou xun
 */
public interface ShoppingCartMapper {
    int insertCart(@Param("shoppingCart") ShoppingCart shoppingCart);

    int queryCart(@Param("userId") Long userId);

    List<ShoppingCartDto> queryUserCart(@Param("goodsRequestDto")GoodsRequestDto goodsRequestDto);

    int addCart(@Param("cartRequestDto") CartRequestDto cartRequestDto);

    int deleteCartGood(@Param("id")List<Integer> cid);

    int updateCartGood(@Param("cartRequestDto") CartRequestDto cartRequestDto);

}
